﻿@{
    Layout = null;
}
@*流量充值*@
<script src="~/Scripts/MGJJS/Market/Payment.js"></script>
 
<style>
    .myTabs.nav-tabs > li.active > a, .myTabs.nav-tabs > li.active > a:focus, .myTabs.nav-tabs > li.active > a:hover{
        color: #555;
        cursor: default;
        background-color: #fff;
        border: 1px solid #ddd;
        border-bottom-color: transparent;
    }
</style>
<div class="mtlr15">
    <ul class="myTabs nav nav-tabs" role="tablist" style="display:flex;align-items:center">
        <li role="presentation" class="">
            <a href="#FlowRecharge" id="FlowRecharge-tab" role="tab" data-toggle="tab" aria-controls="FlowRecharge" aria-expanded="true">账户充值</a>
        </li>
        <li role="presentation" class="">
            <a href="#ChargeRecord" role="tab" id="ChargeRecord-tab" data-toggle="tab" aria-controls="ChargeRecord" aria-expanded="false">充值记录</a>
        </li>
    </ul>
    <div class="tab-content" style="margin-top:10px;">
        <form id="FlowRecharge" role="tabpanel" class="tab-pane fade  in  form-horizontal" aria-labelledby="FlowRecharge-tab">
            <div class="form-group">
                <div class="col-md-2 text-right">充值金额：</div>
                <div class="col-md-4 ">
                    <input type="text" name="Template" id="money" placeholder="充值金额" class="form-control" />
                </div>
                <div class="col-md-3">元</div>
            </div>
            <div class="form-group">
                <div class="col-md-2 text-right"></div>
                <div class="col-md-7 ">
                    <p>注：</p>
                    <p>单笔充值不超过3000元，最小10元</p>
                    <p>支持微信，支付宝和借记卡付款</p>
                </div>
                <div class="col-md-3"></div>
            </div>
            <div class="form-group">
                <div class="col-md-2 text-right">短信查询结果：</div>
                <div class="col-md-7 ">
                    <textarea class="form-control" id="reamk"></textarea>
                </div>
                <div class="col-md-3"></div>
            </div>
            <div class="form-group">
                <div class="col-md-2 text-right"></div>
                <div class="col-md-7 ">
                    <a class="btn btn-success" id="buy" onclick="skipUrl()">立即购买</a>
                </div>
                <div class="col-md-3"></div>
            </div>
        </form>

        <div role="tabpanel" class="tab-pane in" id="ChargeRecord" aria-labelledby="ChargeRecord-tab">
            <div class="row">
                <div class="col-lg-7 col-md-7 col-sm-7" style="padding:0">
                    </div>
                    <div class="col-lg-5 col-md-5 col-sm-5">

                        <div class="input-group">
                            <span class="input-group-addon" style="padding:0;border:none">
                                <select style="height:32px;" class="btn btn-default" id="Ctype" onchange="$.MGJ.Payment.Ajax_PageList(1)">
                                    <option value="0">全部</option>
                                    <option value="1">微信支付</option>
                                    <option value="2">支付宝支付</option>
                                    <option value="3">银行卡支付</option>
                                    <option value="4">其它</option>
                                   
                                </select>
                            </span>
                            <input id="Csearch" type="text" class="form-control " placeholder="字符流水号" />
                            <span class="input-group-addon" onclick="$.MGJ.Payment.Ajax_PageList(1)">
                                <span class="glyphicon glyphicon-search"></span>
                            </span>
                        </div>
                    </div>
                </div>
            <table id="payTable" class="table table-hover table-bordered" style="text-align:center">
                <thead>

                    <tr>
                        <th width="15"><input type="checkbox" class="AllClickCheckbox"></th>
                        <th>字符流水号</th>
                        <th>充值时间</th>
                        <th>充值金额(元)</th>
                        <th>充值类型</th>
                        <th>支付账号</th>
                        <th>说明</th>
                 
                    </tr>
                </thead>
                <tbody id="payTable_Data" style="display:none;" binding="{'pageId':'ShoppingPager','pageCallback':'$.MGJ.Payment.Ajax_PageList','emptyHtml':Payment_EmptyHtml}">
                    <tr>
                        <th width="15"><input type="checkbox" class="AllClickCheckbox"></th>
                        <td binding="{'text':'out_trade_no'}"></td>
                        <td binding="{'text':'DealTime','textHandle':'datetime'}" ></td>
                        <td binding="{'text':'DealMoney'}"></td>
                        <td binding="{'text':'PeyType','textHandle':$.MGJ.Payment.Bin_type}"></td>
                        <td binding="{'text':'LoginName'}"></td>
                        <td binding="{'text':'remark'}"></td>
                    </tr>
                </tbody>
            </table>
            <div id="ShoppingPager"></div>
        </div>

        </div>
    </div>
<script>
    var ColspanNub = $(".table.table-hover.table-bordered").find("tr").children("td").length
    window.Payment_EmptyHtml = '<tr><td colspan="' + ColspanNub + '"><p class="no-result">无符合条件的数据结果</p></td></tr>';

    $.MGJ.Payment.Ajax_PageList(1,null,0);

    if ($('.main .big-right').attr('pay') == 'record')
    {
        $(' .myTabs.nav-tabs li:nth-child(2)').addClass('active');
        $('#ChargeRecord').addClass('active');
    }
    else {
        $(' .myTabs.nav-tabs li:nth-child(1)').addClass('active');
        $('#FlowRecharge').addClass('active');
    }
 
    function skipUrl() {
        //$("#buy").attr("href", "/Payment/NativePayPage?fee=" + $('#money').val() + "&reamk=" + $("#reamk").val());

        $('.main .big-right').load('/Payment/NativePayPage', {fee: $('#money').val(), reamk: $("#reamk").val()});
    } 
</script>